import logging
import yagmail
def log_set():
    logging.basicConfig(level=logging.DEBUG,format='%(name)s_%(module)s_%(created)f',handlers=[
        logging.StreamHandler(),
        logging.FileHandler('log.txt')
    ])
def send_mail(a):
    mail=yagmail.SMTP(user='3221546893@qq.com',password='uwmbfszilskjchaj',host='smtp.qq.com')
    mail.send(to='3221546893@qq.com',subject='测试标题',contents='测试内容',attachments=a)